const webpack = require("webpack");
module.exports = {
  transpileDependencies: ["webpack-dev-server/client"],
  configureWebpack: {
    plugins: [
      new webpack.ProvidePlugin({
        "window.Quill": "quill/dist/quill.js",
        Quill: "quill/dist/quill.js"
      })
    ]
  },
  // baseUrl: process.env.NODE_ENV === 'production'
  // ? '/langya/'
  // : '/langya/',
  productionSourceMap: false,
  devServer: {
    port: 8089, // 端口号
    host: "192.168.0.79",
    https: false, // https:{type:Boolean}
    open: true, //配置自动启动浏览器
    // proxy: 'http://localhost:4000' // 配置跨域处理,只有一个代理
    proxy: {
      "/api": {
        //target: "http://yjh.com",
        target: "https://yjh.tianyibim.com",
        // target: "http://testyjh_admin.tianyibim.com",
        ws: true,
        secure: false,
        changeOrigin: true,
        pathRewrite: {
          "^/apis": "" //需要rewrite的,
        }
      }
      // '/foo': {
      //     target: '<other_url>'
      // }
    } // 配置多个代理
  }
};
